package com.zp.drug.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zp.common.myBatis.core.mapper.BaseMapperPlus;
import com.zp.drug.entity.DrugInventoryCheckPreparation;
import com.zp.drug.entity.bo.DrugInventoryCheckPreparationBo;
import com.zp.drug.entity.bo.DrugStockBo;
import com.zp.drug.entity.vo.DrugInventoryCheckPreparationVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 药品预盘点表Mapper接口
 *
 * @author zhang peng
 * @ date 2024-06-14
 */
@Repository
public interface DrugInventoryCheckPreparationMapper extends BaseMapperPlus<DrugInventoryCheckPreparationMapper, DrugInventoryCheckPreparation, DrugInventoryCheckPreparationVo> {


    /**
     * 按申请单分组查询盘点记录
     *
     * @param drugInventoryCheckPreparationBo
     * @return
     */
    Page<DrugInventoryCheckPreparationVo> selectGroupInventoryNo(
            @Param("page") Page<DrugInventoryCheckPreparationBo> page, @Param("bo") DrugInventoryCheckPreparationBo drugInventoryCheckPreparationBo);


    /**
     * 获取盘点药品明细（通过批号等字段分组）
     *
     * @param bo
     * @return
     */
    List<DrugInventoryCheckPreparationVo> getInventoryCheckList(DrugStockBo bo);
}
